//
//  AppDelegate.m
//  baisibudejie
//
//  Created by 陈博文 on 15/12/17.
//  Copyright © 2015年 陈博文. All rights reserved.
//

#import "AppDelegate.h"

#import "BSTabBarController.h"
#import "BSADViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
   
    //1.设置强引用 2. 设置尺寸
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    
       
    BSTabBarController *tabBar = [[BSTabBarController alloc]init];
    /**
     为了节省开发时间,就不进行广告这一步了
     */
    
//    BSADViewController *advc = [[BSADViewController alloc]init];
//    self.window.rootViewController = advc;
    
    self.window.rootViewController = tabBar;
    
    
    //存在的问题:1.图片被渲染 2.文字被渲染 3.中间的发布不能居中
   /*    
    解决:让选中图片不要渲染, 1.通过修改图片 2.通过代码,告诉它哪个图片不要渲染
    发布按钮显示不出来:
    位置:tabBarButton上的图片位置是谁决定,系统
    排除:tabBarButton上的图片位置跟文字没有关系,
    tabBarButton上的图片位置不对,根图片的尺寸由关系,太大了,导致不能完全显示.
    
    发布按钮,不是tabBar上自带的按钮
    */
    //3.设置显示
    [self.window makeKeyAndVisible];
    return YES;
}





- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
